$(document).ready(function()
{
	
	$('#pagehead').hide();
	
	
	
	$('#authenticate').click(function() 
	{
		
			var username = $('#login_field').val() ; 
			var password = $('#password').val() ; 
			
			$.post('/svnapproval/index/authenticate', { 'username': username , 'password': password },function(data) 
			{
				
				//alert(data) ; 
				if(data=="1")
				{
					window.location.href='/svnapproval/index/' ; 
				}
				else
				{
					alert("wrong password") ; 
					
					//window.location.href='/svnapproval/index/login/' ;
				}
				
				
			}) ; 
		
			
			
			
		
	}); 
	
	
	
}); 